<?php

include("setup.php");

$setup = new setup();


		if ($_FILES["file"]["error"] > 0)	{	
			//an exei error epestrepse me to error

	  		"Error: " . $_FILES["file"]["error"] . "<br />";

	 	 }else 	{
	 	 	//kane upload to file kai emfanise ta stoixeia tou

	 	 	move_uploaded_file($_FILES["file"]["tmp_name"],"uploads/".$_FILES["file"]["name"]);

	      	$_SESSION['upload'] = "Ανέβηκε : ".$_FILES["file"]["name"]."<br />";
	      	$_SESSION['upload'] .= "Τύπος: ".$_FILES["file"]["type"]."<br />";
	      	$_SESSION['upload'] .= "Μέγεθος: ".($_FILES["file"]["size"] / 1024)." Kb<br />";
	      	$_SESSION['upload'] .= "Αποθηκεύτηκε στο: ".$_FILES["file"]["tmp_name"]."<br/>";
	      	$_SESSION['upload'] .= "Αποθηκεύτηκε στο: " . "upload/" . $_FILES["file"]["name"];

	      	$setup->redirect($setup->getHost()."portal.php?action=mycv&upload=1");
	  	}

	

?>	